package net.towee.client.event.core;

import net.towee.model.account.ContactsGroup;

import com.google.gwt.event.shared.GwtEvent;

public class ContactsGroupChangedEvent extends GwtEvent<ContactsGroupChangedHandler> {
	public static Type<ContactsGroupChangedHandler> TYPE = new Type<ContactsGroupChangedHandler>();
	private final ContactsGroup group;
	
	public ContactsGroupChangedEvent(ContactsGroup g) {
		this.group = g;
	}

	@Override
	public Type<ContactsGroupChangedHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(ContactsGroupChangedHandler handler) {
		handler.onContactsGroupChanged(group);
	}

}
